<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>코드수정</title>
	<link rel="stylesheet" type="text/css" href="/inc/css/common.css" />
	<script type="text/javascript" src="/inc/css/common.js"></script>
	<script type="text/javascript">
		
		//저장버튼
		function updateCommonCode() {
		
			var cd 		= form_pop.cd.value;
			var use_yn	= form_pop.use_yn.value;
			
			if (use_yn == "N" && cd == "0") {
				form_pop.action="updateGroupCode.action";
				window.close();
				alert("완료되었습니다.");
	   			opener.location.reload();
			}else {	
				form_pop.action="updateCommonCode.action";
				window.close();
				alert("완료되었습니다.");
	   			opener.location.reload();
			}
		}


	</script>
</head>
<body>
	
<s:form name="form_pop" theme="simple">

<div id="popup_550se_top" ></div>
<div id="popup_550se_bg">
	<table class="pop550se_Tbl">
	<s:iterator value="list" status="status" >
	<tr>
		<th>대표코드</th>
		<td>
			<input type="text" name="group_cd" value="<s:property value="group_cd" />" readonly="readonly" class="input_120se"></input>
		</td>
		<th>대표코드명</th>
		<td>
			<input type="text" name="group_code_nm" value="<s:property value="group_code_nm" />" readonly="readonly" class="input_120se"></input>		
		</td>
	</tr>
	<tr>
		<th>코드</th>
		<td>
			<input type="text" name="cd" value="<s:property value="cd" />" readonly="readonly" class="input_120se"></input>
		</td>
		<th>코드명</th>
		<td>
			<input type="text" name="full_nm" value="<s:property value="full_nm" />" readonly="readonly" class="input_120se"></input>		
		</td>
	</tr>
	<tr>
		<th>사용여부</th>
		<td>
			<s:select name="use_yn"   headerKey="" headerValue="::선택하세요::" list="#{'Y':'Y','N':'N'}" cssClass="combobox120se"/>		
		</td>
	</tr>
	</s:iterator>
	</table>	
	
	<div id="popup_btn"><s:submit type="image" src="/images/btn_save.gif" onclick="updateCommonCode()"/></div>
</div>

<!---------------Bottom : STR----------->
<div id="popup_550se_bottom"><s:submit type="image" src="/images/pop_btn_close.gif" onclick="window.close(); return false;"/></div>
<!---------------Bottom : END----------->
</s:form>
</body>
</html>